package goleetcode

func getSmallestString(s string) string {
	r := []rune(s)
	for i := 0; i + 1 < len(r); i++ {
		if r[i] > r[i + 1] && r[i] % 2 == r[i + 1] % 2 {
			r[i], r[i + 1] = r[i+1], r[i]
			break
		}
	}
	return string(r)
}

